-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: prevent parent view scroll when press space bar and arrow #56435
base: main
Are you sure you want to change the base?
fix: prevent parent view scroll when press space bar and arrow #56435
Conversation
@DylanDylann Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
I've updated and replied to the review change. |
As my checking, we only use shouldUseScrollView as true in 3 places: SearchTypeMenuNarrow, AccountSwitcher, VideoPopoverMenu @linhvovan29546 Could you check 3 places to see whether we can always prevent scrolling when clicking the space button? |
If yes, we can remove scrollableElement.scrollBy function in here |
…hen-press-space-bar
FYI, after merging the main branch, I noticed that the navigation has significantly changed and was broken by previous code. I am rechecking it |
@DylanDylann My bad, after checking, I think we can call e.preventDefault only when shouldUseScrollView is false. |
I've updated it. The change in the |
First, could you explain again why do we need to add scrollEnabled |
Yes, the change in the Screen.Recording.2025-02-14.at.2.44.40.PM.mov |
@linhvovan29546 We can use scrollEnabled={isFocused}, right? |
Could you detail this point? |
Yes |
You can add ![]() |
@linhvovan29546 Why do you log on InitialSettingsPage? We need to use scrollEnabled={isFocused} in ProfilePage Screen.Recording.2025-02-14.at.16.01.35.mov |
I answered the question, |
For me, InitialSettingsPage isn't scrolled down when entering space |
Thanks, I'll update |
@linhvovan29546 Please review all your changes again and ping me when everything is ready |
@DylanDylann This is ready. Thank you for your review! 👍 |
Explanation of Change
Fixed Issues
$ #55832
PROPOSAL: #55832 (comment)
Tests
Precond: User has a long Workspace list
Precond: User has a long list
We can apply this test to other lists as well
Offline tests
Same Test above
QA Steps
Same Test above
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
This change only apply for web and desktop
Android: mWeb Chrome
Screen.Recording.2025-02-10.at.8.52.20.PM.mov
iOS: Native
This change only apply for web and desktop
iOS: mWeb Safari
Screen.Recording.2025-02-10.at.7.14.19.PM.mov
MacOS: Chrome / Safari
Screen.Recording.2025-02-06.at.7.41.49.AM.mov
Screen.Recording.2025-02-06.at.7.44.16.AM.mov
Screen.Recording.2025-02-06.at.7.44.51.AM.mov
MacOS: Desktop
Screen.Recording.2025-02-06.at.7.48.23.AM.mov